/*
 * @Description:
 * @Author: Rfan
 * @Date: 2022-06-01 20:06:39
 * @LastEditTime: 2022-06-21 21:40:20
 */
import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

export const arrangement = lazy(
  () => import(/* webpackChunkName: "Management" */ '@/view/management/Arrangement/ArrangementMain')
);

// export const boxMgt = lazy(
//   () => import(/* webpackChunkName: "Management" */ '@/view/management/BoxMgt/BoxMgtMain')
// );

export const exportMgt = lazy(
  () => import(/* webpackChunkName: "Management" */ '@/view/management/ExportMgt/ExportMgtMain')
);

export const MgtOnlinePreview = lazy(
  () =>
    import(/* webpackChunkName: "Management" */ '@/view/management/OnlinePreview/OnlinePreviewMain')
);

export const transfer = lazy(
  () => import(/* webpackChunkName: "Management" */ '@/view/management/Transfer/TransferMain')
);

const managementRoutes: any[] = [
  {
    path: '/management',
    element: <Layout />,
    meta: {
      title: '档案管理'
    },
    children: [
      // {
      //   path: 'apply',
      //   element: <UseApply />,
      //   meta: {
      //     title: '利用申请'
      //   }
      // },
      {
        path: 'arrangement',
        element: lazyLoad(arrangement),
        meta: {
          title: '档案管理'
        }
      },
      // {
      //   path: 'box-mgt',
      //   element: lazyLoad(boxMgt),
      //   meta: {
      //     title: '盒管理'
      //   }
      // },
      {
        path: 'export-mgt',
        element: lazyLoad(exportMgt),
        meta: {
          title: '档案导出管理'
        }
      },
      {
        path: 'online-preview',
        element: lazyLoad(MgtOnlinePreview),
        meta: {
          title: '在线预览'
        }
      },
      {
        path: 'transfer',
        element: lazyLoad(transfer),
        meta: {
          title: '档案在线移交'
        }
      }
    ]
  }
];

export default managementRoutes;
